//
//  XYChapterListModel.swift
//  XYReadBook
//
//  Created by fox on 2017/9/9.
//  Copyright © 2017年 tsaievan. All rights reserved.
//

import UIKit
import ObjectMapper
/// 章节列表模型
class XYChapterListModel: BaseResponse {
    
    var mixToc: MixToc?
    var ok:Bool = true
    
    override func mapping(map: Map) {
        mixToc              <- map["mixToc"]
        ok                  <- map["ok"]
    }
}


class MixToc: BaseResponse {
    var id:String = ""
    var book:String = ""
    var chaptersCount1:Int = 467
    var chaptersUpdated:String = ""
    var chapters:[Chapters] = []
    override func mapping(map: Map) {
        id                  <- map["_id"]
        book                <- map["book"]
        chaptersCount1      <- map["chaptersCount1"]
        chaptersUpdated     <- map["chaptersUpdated"]
        chapters            <- map["chapters"]
    }
}


class Chapters: BaseResponse {
    var title:String = ""
    var link:String = ""
    var unreadble:Bool = false
    
    override func mapping(map: Map) {
        title               <- map["title"]
        link                <- map["link"]
        unreadble           <- map["unreadble"]
    }
}

class XYChapterTextModel: BaseResponse{
    var ok = true
    var chapter:XYChapterText!

    override func mapping(map: Map) {
        ok              <- map["ok"]
        chapter         <- map["chapter"]
    }

}

class XYChapterText: BaseResponse{
    var title = ""
    var body = ""

    override func mapping(map: Map) {
        title             <- map["title"]
        body              <- map["body"]
    }
}

